﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ucRegister.ascx.cs" Inherits="UserControl_ucRegister" %>
<%@ Register Assembly="MSCaptcha" Namespace="MSCaptcha" TagPrefix="cc1" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:UpdatePanel ID="updatePnlReg" runat="server">
    <ContentTemplate>
        <table border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
                <td height="30" class="btTitle" style="padding-left: 30px">
                    Register to MPR Express
                </td>
            </tr>
            <tr>
                <td align="center">
                    <asp:Label ID="lblMessage" runat="server" Visible="true" ForeColor="Red" Text=""></asp:Label>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Panel ID="Panel1" runat="server" DefaultButton="cmdRegister">
                        <table border="0" align="center" cellpadding="0" cellspacing="0">
                            <tr>
                                <td align="center">
                                    <table border="0" style="padding: 10px 0 5px 10px;" cellspacing="6px">
                                        <tr>
                                            <td style="text-align: right; width: 100px">
                                                Email Address:
                                            </td>
                                            <td>
                                                <asp:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender1" runat="server" TargetControlID="txtUsername"
                                                    WatermarkCssClass="clsWaterMarkRequiredField" WatermarkText="email@user.com">
                                                </asp:TextBoxWatermarkExtender>
                                                <asp:TextBox ID="txtUsername" runat="server" CssClass="txtRegisterReq" ToolTip="Input email"
                                                    ValidationGroup="grpRegister" autocomplete="off" Width="300px"></asp:TextBox>
                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtUsername" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"
                                                    SetFocusOnError="true" Text="" ValidationGroup="grpRegister" ErrorMessage="*"
                                                    Display="Static"></asp:RequiredFieldValidator>                                                                                                       
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="text-align: right">
                                                Password:
                                            </td>
                                            <td>
                                                <asp:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender2" runat="server" TargetControlID="txtPassword"
                                                    WatermarkCssClass="clsWaterMarkRequiredField" WatermarkText="Password">
                                                </asp:TextBoxWatermarkExtender>
                                                <asp:TextBox ID="txtPassword" runat="server" CssClass="txtRegisterReq" TextMode="Password"
                                                    ToolTip="Input password" ValidationGroup="grpRegister" Width="300px"> </asp:TextBox>
                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtPassword"
                                                    SetFocusOnError="true" Text="" ValidationGroup="grpRegister" ErrorMessage="*"
                                                    Display="Static"></asp:RequiredFieldValidator>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="text-align: right">
                                                First Name</td>
                                            <td>
                                                <asp:TextBox ID="txtFName" runat="server" CssClass="txtRegisterReq" ValidationGroup="grpRegister" 
                                                    Width="300px"></asp:TextBox>
                                                <asp:TextBoxWatermarkExtender ID="txtFName_TextBoxWatermarkExtender" 
                                                    runat="server" TargetControlID="txtFName" 
                                                    WatermarkCssClass="clsWaterMarkRequiredField" WatermarkText="FirstName">
                                                </asp:TextBoxWatermarkExtender>
                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                                                    ControlToValidate="txtFName" Display="Static" ErrorMessage="*" 
                                                    SetFocusOnError="true" Text="" ValidationGroup="grpRegister"></asp:RequiredFieldValidator>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="text-align: right">
                                                Last Name</td>
                                            <td>
                                                <asp:TextBox ID="txtLName" runat="server" CssClass="txtRegisterReq"  ValidationGroup="grpRegister" 
                                                    Width="300px"></asp:TextBox>
                                                <asp:TextBoxWatermarkExtender ID="txtLName_TextBoxWatermarkExtender" 
                                                    runat="server" TargetControlID="txtLName" 
                                                    WatermarkCssClass="clsWaterMarkRequiredField" WatermarkText="LastName">
                                                </asp:TextBoxWatermarkExtender>
                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 
                                                    ControlToValidate="txtLName" Display="Static" ErrorMessage="*" 
                                                    SetFocusOnError="true" Text="" ValidationGroup="grpRegister"></asp:RequiredFieldValidator>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="text-align: right">
                                                Verification
                                            </td>
                                            <td>
                                                <asp:UpdatePanel ID="updCap" runat="server">
                                                    <ContentTemplate>
                                                        <cc1:CaptchaControl ID="msCaptcha" runat="server" BorderWidth="1px" BorderStyle="Solid"
                                                            BorderColor="#5daeff" Width="185" FontColor="#007eb3" ForeColor="AliceBlue" NoiseColor="#237ceb"
                                                            CaptchaBackgroundNoise="Extreme" CaptchaLength="5" CaptchaHeight="50" CaptchaWidth="185"
                                                            CaptchaLineNoise="None" CaptchaMinTimeout="5" CaptchaMaxTimeout="240" LineColor="Yellow"
                                                            CaptchaFontWarping="Low" />
                                                    </ContentTemplate>
                                                </asp:UpdatePanel>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="text-align: right">
                                                &nbsp;
                                            </td>
                                            <td>
                                                <asp:Label ID="lblInputCaptcha" runat="server" Text="Verificaton code:" Style="font-size: 12px;"></asp:Label><asp:UpdatePanel
                                                    ID="updTxt" runat="server">
                                                    <ContentTemplate>
                                                        <asp:TextBox ID="txtCaptcha" runat="server" Width="100" CssClass="txtRegisterReq"
                                                            autocomplete="off" ToolTip="Verificaton code"></asp:TextBox>&nbsp;<asp:RequiredFieldValidator
                                                                ID="regCaptcha" runat="server" ErrorMessage="" ToolTip="Please input the captcha characters."
                                                                ForeColor="Red" ControlToValidate="txtCaptcha" SetFocusOnError="true" Text="*"
                                                                ValidationGroup="grpRegister"></asp:RequiredFieldValidator></ContentTemplate>
                                                    <Triggers>
                                                        <asp:AsyncPostBackTrigger ControlID="lnkRefreshCaptcha" EventName="Click" />
                                                    </Triggers>
                                                </asp:UpdatePanel>
                                                <asp:LinkButton ID="lnkRefreshCaptcha" runat="server" Text="Refresh Letters" CausesValidation="false"
                                                    Style="font-size: 12px;"></asp:LinkButton>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                            </td>
                                            <td align="left">
                                                <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                                                    <ContentTemplate>
                                                        <asp:Button ID="cmdRegister" runat="server" Text="Register" CssClass="button_all"
                                                            ValidationGroup="grpRegister" OnClick="cmdRegister_Click" />
                                                    </ContentTemplate>
                                                    <Triggers>
                                                        <asp:AsyncPostBackTrigger ControlID="cmdRegister" EventName="Click" />
                                                    </Triggers>
                                                </asp:UpdatePanel>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </table>
                    </asp:Panel>
                </td>
            </tr>
            <tr>
                <td style="text-align: center">
                    <asp:UpdateProgress ID="UpdateProgress1" runat="server">
                        <ProgressTemplate>
                            <asp:Image ID="imgLoading" runat="server" ToolTip="Loading..." ImageUrl="~/images/loadingAnimation.gif"
                                Style="border-width: 0px;" />
                        </ProgressTemplate>
                    </asp:UpdateProgress>
                </td>
            </tr>
        </table>
    </ContentTemplate>
</asp:UpdatePanel>
